<?php

/**
 * @package Emvicy
 * @copyright ueffing.net
 * @author Guido K.B.W. Üffing <emvicy@ueffing.net>
 * @license GNU GENERAL PUBLIC LICENSE Version 3. See application/doc/COPYING
 *
 * these configs here do extend and overwrite:
 * `/modules/{module}/etc/config/_mvc.php`
 */

//######################################################################################################################
// Emvicy

declare(strict_types=1);  // @see https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict
error_reporting(E_ALL);
date_default_timezone_set('Europe/Berlin');

// add routing files dir
$aConfig['MVC_ROUTING_DIR'][] = realpath(__DIR__ . '/../../../') . '/routing';

// recommended to set a logrotate mechanism for these logfiles as they may grow quickly
$aConfig['MVC_LOG_SQL'] = true;
$aConfig['MVC_LOG_EVENT'] = true;
$aConfig['MVC_LOG_EVENT_RUN'] = false;
$aConfig['MVC_LOG_ERROR'] = true;               // recommended to set to true for ALL environments
$aConfig['MVC_LOG_NOTICE'] = true;
$aConfig['MVC_LOG_POLICY'] = true;
$aConfig['MVC_LOG_WARNING'] = true;
$aConfig['MVC_LOG_REQUEST'] = true;
$aConfig['MVC_LOG_DEFAULT'] = true;
$aConfig['MVC_LOG_AUTOLOADER'] = false;         // recommended to set to true for develop environments only: Log autoloader actions
$aConfig['MVC_LOG_ROUTEINTERVALL'] = true;      // recommended to set to true for develop environments only: Log Route Intervall actions
$aConfig['MVC_LOG_FORCE_LINEBREAK'] = true;     // force linebreaks in logfiles no matter what, improves readability of logs but blows up logfile

$aConfig['MVC_INFOTOOL_ENABLE'] = true;         // recommended to set to true for develop environments only: show InfoTool bar


//######################################################################################################################
// Module {module}

$aConfig['MODULE']['{module}'] = array();

// ...your config goes here...

//----------------------------------------------------------------------------------------------------------------------
// DB
// watch database log; e.g.:      cd /tmp; tail -f {module}*.log

require_once realpath(__DIR__) . '/_db.php';
// consider a logrotate mechanism for this logfile as it may grow quickly
$aConfig['MODULE']['{module}']['DB']['logging']['general_log'] = 'ON'; // consider to set it to ON for develop or test environments only


//######################################################################################################################
// common settings

require_once realpath(__DIR__) . '/_function.php';
require_once realpath(__DIR__) . '/_datatype.php';
require_once realpath(__DIR__) . '/_session.php';
require_once realpath(__DIR__) . '/_csp.php';